(function (line) {
    line.extend(line, {
        //TODO: keep one unique method
        //line.distinct([1,null,2,{a:'vc'},{},'5',6,5,6,{a:'vv'},15,5,'5',5,'',' ',[1],[1],[1,2],,window,window,"1"])
        //({a:'vc'}).toString()==>[object Ojbect],less this condition.
        //1,"1"==>"1"
        distinct:function (inArray) {
            var table = {},
                result = [],
                tableKey;
            line.each(inArray, function (val) {
                tableKey = line.getType(val) + val;
                if (!table[tableKey]) {
                    result.push(val);
                    table[tableKey] = true;
                }
            });
            return result;
        },
        unique:function (inArray) {
            var result = [];
            line.each(inArray, function (val) {
                if (line.indexOf(result, val) === -1) {
                    result.push(val);
                }
            });
            return result;
        },
        unique2:function (inArray) {
            var table = {},
                result = [],
                tableKey;
            line.each(inArray, function (val) {
                if (line.isObject(val)) {
                    if (line.indexOf(result, val) === -1) {
                        result.push(val);
                    }
                } else {
                    tableKey = line.getType(val) + val;
                    if (!table[tableKey]) {
                        result.push(val);
                        table[tableKey] = true;
                    }
                }
            });
            return result;
        },
        quickUnique:function (inArray) {
            var results = inArray.sort();
            for (var i = 1; i < results.length; i++) {
                if (results[i] === results[i - 1]) {
                    results.splice(i--, 1);
                }
            }
            return results;
        }
    })
});